{
 "nbformat": 4,
 "nbformat_minor": 0,
 "metadata": {
  "colab": {
   "provenance": [],
   "gpuType": "T4"
  },
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3 (ipykernel)",
   "language": "python"
  },
  "language_info": {
   "name": "python"
  },
  "accelerator": "GPU"
 },
 "cells": [
  {
   "cell_type": "code",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "UL1E0BxcfMBw",
    "outputId": "e0b123f7-ad70-49d5-9e3a-284ae88af8fc",
    "ExecuteTime": {
     "end_time": "2025-02-23T10:22:48.060358Z",
     "start_time": "2025-02-23T10:22:47.949924Z"
    }
   },
   "source": [
    "!ls /"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "bin\n",
      "cmd\n",
      "dev\n",
      "etc\n",
      "git-bash.exe\n",
      "git-cmd.exe\n",
      "LICENSE.txt\n",
      "mingw64\n",
      "proc\n",
      "ReleaseNotes.html\n",
      "tmp\n",
      "unins000.dat\n",
      "unins000.exe\n",
      "unins000.msg\n",
      "usr\n"
     ]
    }
   ],
   "execution_count": 1
  },
  {
   "cell_type": "code",
   "source": [
    "!pwd"
   ],
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "4XzZGzN_flxI",
    "outputId": "12c04614-ae97-45b5-d462-7eaa5a890d80",
    "ExecuteTime": {
     "end_time": "2025-02-23T10:23:00.247178Z",
     "start_time": "2025-02-23T10:23:00.193318Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/d/Python/Python_code/Python_code2025/day18\n"
     ]
    }
   ],
   "execution_count": 2
  },
  {
   "cell_type": "code",
   "source": [
    "!nvcc -V"
   ],
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "EiRNyFbof61N",
    "outputId": "d5c14ee6-a972-46f4-89fa-d01e0ad8b109",
    "ExecuteTime": {
     "end_time": "2025-02-23T10:23:00.820016Z",
     "start_time": "2025-02-23T10:23:00.689355Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "nvcc: NVIDIA (R) Cuda compiler driver\n",
      "Copyright (c) 2005-2024 NVIDIA Corporation\n",
      "Built on Wed_Oct_30_01:18:48_Pacific_Daylight_Time_2024\n",
      "Cuda compilation tools, release 12.6, V12.6.85\n",
      "Build cuda_12.6.r12.6/compiler.35059454_0\n"
     ]
    }
   ],
   "execution_count": 3
  },
  {
   "cell_type": "code",
   "source": [
    "!nvidia-smi"
   ],
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "57jxtbuwgJtO",
    "outputId": "93ab64f6-89a6-402d-83ae-56df21496f42",
    "ExecuteTime": {
     "end_time": "2025-02-23T10:23:02.171700Z",
     "start_time": "2025-02-23T10:23:02.063423Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sun Feb 23 18:23:02 2025       \n",
      "+-----------------------------------------------------------------------------------------+\n",
      "| NVIDIA-SMI 572.47                 Driver Version: 572.47         CUDA Version: 12.8     |\n",
      "|-----------------------------------------+------------------------+----------------------+\n",
      "| GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |\n",
      "| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |\n",
      "|                                         |                        |               MIG M. |\n",
      "|=========================================+========================+======================|\n",
      "|   0  NVIDIA GeForce RTX 3070 Ti   WDDM  |   00000000:09:00.0  On |                  N/A |\n",
      "|  0%   44C    P8             23W /  310W |    1425MiB /   8192MiB |     17%      Default |\n",
      "|                                         |                        |                  N/A |\n",
      "+-----------------------------------------+------------------------+----------------------+\n",
      "                                                                                         \n",
      "+-----------------------------------------------------------------------------------------+\n",
      "| Processes:                                                                              |\n",
      "|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |\n",
      "|        ID   ID                                                               Usage      |\n",
      "|=========================================================================================|\n",
      "|    0   N/A  N/A            2036    C+G   ...ram Files\\Tencent\\QQNT\\QQ.exe      N/A      |\n",
      "|    0   N/A  N/A            4312    C+G   ...acted\\runtime\\WeChatAppEx.exe      N/A      |\n",
      "|    0   N/A  N/A            6028    C+G   ...t\\Edge\\Application\\msedge.exe      N/A      |\n",
      "|    0   N/A  N/A           11376    C+G   ...8bbwe\\PhoneExperienceHost.exe      N/A      |\n",
      "|    0   N/A  N/A           12384    C+G   ...5n1h2txyewy\\TextInputHost.exe      N/A      |\n",
      "|    0   N/A  N/A           13380    C+G   C:\\Windows\\explorer.exe               N/A      |\n",
      "|    0   N/A  N/A           14088    C+G   ...ce\\root\\Office16\\POWERPNT.EXE      N/A      |\n",
      "|    0   N/A  N/A           15408    C+G   ...ekyb3d8bbwe\\CalculatorApp.exe      N/A      |\n",
      "|    0   N/A  N/A           16076    C+G   ...ef.win7x64\\steamwebhelper.exe      N/A      |\n",
      "|    0   N/A  N/A           17484    C+G   ...rm 2024.1.6\\bin\\pycharm64.exe      N/A      |\n",
      "|    0   N/A  N/A           21028    C+G   ...IA app\\CEF\\NVIDIA Overlay.exe      N/A      |\n",
      "|    0   N/A  N/A           22080    C+G   ...ntrolPanel\\SystemSettings.exe      N/A      |\n",
      "|    0   N/A  N/A           22336    C+G   ...IA app\\CEF\\NVIDIA Overlay.exe      N/A      |\n",
      "|    0   N/A  N/A           24148    C+G   ...Sony\\INZONE Hub\\INZONEHub.exe      N/A      |\n",
      "|    0   N/A  N/A           27780    C+G   ...lpaper_engine\\wallpaper32.exe      N/A      |\n",
      "|    0   N/A  N/A           30460    C+G   ...h_cw5n1h2txyewy\\SearchApp.exe      N/A      |\n",
      "|    0   N/A  N/A           31860    C+G   ...App_cw5n1h2txyewy\\LockApp.exe      N/A      |\n",
      "|    0   N/A  N/A           33536    C+G   ....0.3065.69\\msedgewebview2.exe      N/A      |\n",
      "|    0   N/A  N/A           33740    C+G   ...em_tray\\lghub_system_tray.exe      N/A      |\n",
      "|    0   N/A  N/A           34680    C+G   ....0.3065.69\\msedgewebview2.exe      N/A      |\n",
      "+-----------------------------------------------------------------------------------------+\n"
     ]
    }
   ],
   "execution_count": 4
  },
  {
   "cell_type": "code",
   "source": [
    "#验证cuda是否ok\n",
    "import torch\n",
    "print(torch.backends.cudnn.version())\n",
    "print(torch.cuda.is_available())\n",
    "print(torch.backends.cudnn.enabled)"
   ],
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "2SGXmO0ziGNJ",
    "outputId": "790a84dc-f5d2-4404-c42c-09ab5b89cbb6",
    "ExecuteTime": {
     "end_time": "2025-02-23T10:23:07.698951Z",
     "start_time": "2025-02-23T10:23:03.404306Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "90501\n",
      "True\n",
      "True\n"
     ]
    }
   ],
   "execution_count": 5
  },
  {
   "cell_type": "code",
   "source": [
    "torch.__version__"
   ],
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 35
    },
    "id": "CxQOmPn1kzc7",
    "outputId": "6abad0a2-08bf-4280-8926-44a4cc9a96e5",
    "ExecuteTime": {
     "end_time": "2025-02-23T10:23:09.139144Z",
     "start_time": "2025-02-23T10:23:09.134316Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2.6.0+cu126'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 6
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": ""
  }
 ]
}
